<!-- thanh toolbar -->
<?php $this->placeholder('toolbar')->captureStart();?>
<?php if(Zend_Registry::get('auth')->account_username=='itvina'){?>
<?php echo $this->partial('index/toolbar/new.phtml', 'admin', array($this->url(array('action' => 'insert')))) ?>
<?php }?>
<?php echo $this->partial('index/toolbar/edit.phtml', 'admin', array($this->url(array('action' => 'update')))) ?>
<?php if(Zend_Registry::get('auth')->account_username=='itvina'){?>
<?php echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/trash.phtml', 'admin', array($this->url(array('action' => 'delete')))) ?>
<?php }?>
<?php $this->placeholder('toolbar')->captureEnd();?>
<!-- / --> 

<form id="adminForm" name="adminForm" method="post" action="">

	<!-- phần tìm kiếm --> 
	<fieldset id="filter-bar" >		
		<?php echo $this->partial('index/search/layout.phtml', 'admin',array ( 
			 $this->partial('index/search/all.phtml', 'admin',array('value'=>$this->search_keyword)), 	
			 $this->partial('index/search/submit.phtml', 'admin') 
		 )); ?>			 
	</fieldset>
	<!-- / -->
	
	<!-- danh sách hiển thị -->
	<div class='clr'> </div>
	<table class="adminlist">
		<thead>
			<tr>
				<?php echo $this->partial('index/manage/save-order.phtml', 'admin', array('column'=>'constant_order')); ?>				
				<?php echo $this->partial('index/manage/checkbox-all.phtml', 'admin'); ?>
				<th>
					<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>'Tên hằng số','column'=>'constant_name')); ?>
				</th>		
				<th>Ghi chú</th>
				<th width='65px'>
					Quản lý
				</th>
			</tr>
		</thead>
		<tbody>
			<?php if (count($this->paginator) > 0): $no=0;$flag="";?>
			<?php foreach ($this->paginator as $row): ?>
			<?php if($flag!=$row->constant_constant_group_code){$flag=$row->constant_constant_group_code;?>
			<tr>
				<td colspan='5' style='color:blue;font-weight: bold;text-transform: uppercase;'>
					<?php echo $flag." - ".$row->m_Array['constant_group_name']?>
				</td>
			</tr>
			<?php }?>
			<tr class='row<?php echo ($no++)%2; ?>'>
				<?php echo $this->partial('index/manage/orderer.phtml', 'admin', array($row->constant_id, $row->constant_order)) ?>
				<?php echo $this->partial('index/manage/checkbox.phtml', 'admin', array($row->constant_id)) ?>
				<td>
					<?php echo $row->constant_name ?><p class="smallsub">(<span>Mã: </span><?php echo $row->constant_code ?>)</p>
				</td>
				<td>
					<?php echo $row->constant_note ?>
				</td>
				<td class="center">
					<?php echo $this->partial("index/manage/edit.phtml","admin", array( $this->url(array('action' => 'update', 'id' => $row->constant_id)))); ?>
					<?php if(Zend_Registry::get('auth')->account_username=='itvina'){?>
					<?php echo $this->partial("index/manage/trash.phtml","admin", array( $this->url(array('action' => 'delete')))); ?>
					<?php }?>
				</td>
			</tr>
			<?php endforeach; ?>
			<?php endif; ?>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="5">
					<div class="container"><?php echo $this->paginationControl($this->paginator) ?></div>
				</td>
			</tr>
		</tfoot>
	</table>
</form>
